#include <iostream>
#include <vector>
using namespace std;
using ll=long long;
int main() {

	int n,m;
	cin>>n>>m;
	vector<ll> vecHap(n),vecSay(n);
	for(int i=0;i<n;++i){
		cin>>vecHap[i];
	}
	for(int i=0;i<n;++i){
		cin>>vecSay[i];
	}
	int left=0,right=0;
	ll nRet=0,nMaxHap=0,nMaxSay=0;
	ll nHap=0,nSay=0;
	while(right<n){
		nHap+=vecHap[right];
		nSay+=vecSay[right];
		if(right-left+1>=m){
			//cout<<nHap<<' '<<nSay<<endl;
			//cout<<nMaxHap<<' '<<nMaxSay<<endl;
			if(nHap>nMaxHap){
				nMaxHap=nHap;
				nMaxSay=nSay;
				nRet=left;
			}
			else if(nHap==nMaxHap && nSay<nMaxSay){
				nMaxHap=nHap;
				nMaxSay=nSay;
				nRet=left;				
			}
			nHap-=vecHap[left];
			nSay-=vecSay[left];
			++left;
		}
		++right;
	}
	cout<<nRet+1<<endl;
	
	return 0;
}
